package com.monitor.module.company.controller;

import com.monitor.entity.response.Rs;
import com.monitor.module.company.service.CompanyService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 企业接口.
 *
 * @author Li Zhiyuan
 * @since 2020-11-17
 */
@RestController
@RequestMapping("/company")
@Slf4j
@Api(tags = "企业接口")
public class CompanyController {
    @Autowired
    private CompanyService service;

    @GetMapping()
    public ResponseEntity<Rs<Object>> list(){
        return Rs.ok(Rs.map().put("data",service.list()));
    }

}
